#pragma once

#include <d3dx9.h>
#include "D3DXDefines.h"
#include "dxutil.h"

class D3DX
{
public:
	typedef std::vector<State> StateList;

public:
	D3DX();
	~D3DX();

	bool Init(HWND hwnd);
	bool SetRenderState(StateList& stateList);
	bool SetSamplerState(StateList& stateList);

	void Clear();
	void BeginScene();
	void EndScene();
	void Present();

	LPDIRECT3DDEVICE9 GetD3DDevice() { return mD3DDevice; }

private:
	LPDIRECT3D9 mD3D;
	LPDIRECT3DDEVICE9 mD3DDevice;
	int mWidth;
	int mHeight;
	bool mFullScreen;
};
